﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EMoney.IStock.Client.Models.CQ
{
    /// <summary>
    /// 竞猜信息
    /// </summary>
    [Serializable]
    public class MyGuess
    {
        /// <summary>
        /// 用户编号
        /// </summary>
        public int UserID { get; set; }
        /// <summary>
        /// 交易日期
        /// </summary>
        public DateTime TradeDate { get; set; }
        /// <summary>
        /// 1:看涨 0:看跌
        /// </summary>
        public int GuessType { get; set; }
        /// <summary>
        /// 竞猜结果 1:对 0:错 -1:复活
        /// </summary>
        public int? GuessResult { get; set; }
        /// <summary>
        /// 是否晋级
        /// </summary>
        public bool? IsPromotion { get; set; }
        /// <summary>
        /// 竞猜时间
        /// </summary>
        public DateTime GuessTime { get; set; }
        /// <summary>
        /// 当日竞猜类型数
        /// </summary>
        public GuessType GuessTypeStat { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string UserPic { get; set; }
        /// <summary>
        /// 用户头像地址
        /// </summary>
        public string UserPicUrl { get; set; }
        /// <summary>
        /// 总竞猜数(竞猜成功后更新)
        /// </summary>
        public int GuessTotalCount { get; set; }
        /// <summary>
        /// 猜中次数(计算竞猜结果时更新)
        /// </summary>
        public int CorrectGuessCount { get; set; }
        /// <summary>
        /// 连续猜对
        /// </summary>
        public int ContinueCorrectGuessCount { get; set; }
        /// <summary>
        /// 连续猜错
        /// </summary>
        public int ContinueErrorGuessCount { get; set; }
    }

    /// <summary>
    /// 竞猜总人数
    /// </summary>
    [Serializable]
    public class GuessTotal
    {
        /// <summary>
        /// 统计时间
        /// </summary>
        public DateTime StatTime { get; set; }
        /// <summary>
        /// 总人数
        /// </summary>
        public int Count { get; set; }
    }

    /// <summary>
    /// 晋级出局人数
    /// </summary>
    [Serializable]
    public class PromotionOutCount
    {
        /// <summary>
        /// 交易日期
        /// </summary>
        public DateTime TradeDate { get; set; }
        /// <summary>
        /// 晋级人数
        /// </summary>
        public int PromotionCount { get; set; }
        /// <summary>
        /// 出局人数
        /// </summary>
        public int OutCount { get; set; }
    }

    /// <summary>
    /// 竞猜结果
    /// </summary>
    [Serializable]
    public class GuessResult
    {
        /// <summary>
        /// 交易日期
        /// </summary>
        public DateTime TradeDate { get; set; }
        /// <summary>
        /// 猜对数量
        /// </summary>
        public int CorrectCount { get; set; }
        /// <summary>
        /// 猜错数量
        /// </summary>
        public int ErrorCount { get; set; }
        /// <summary>
        /// 晋级数量
        /// </summary>
        public int PromotionCount { get; set; }
        /// <summary>
        /// 复活数量
        /// </summary>
        public int ReviveCount { get; set; }
    }

    /// <summary>
    /// 竞猜记录
    /// </summary>
    [Serializable]
    public class GuessType
    {
        /// <summary>
        /// 交易日期
        /// </summary>
        public DateTime TradeDate { get; set; }
        /// <summary>
        /// 看涨数量
        /// </summary>
        public int UpCount { get; set; }
        /// <summary>
        /// 看跌数量
        /// </summary>
        public int DownCount { get; set; }
    }
}
